package com.generator.service.column.impl;

import com.generator.dao.column.ColumnDao;
import com.generator.entity.column.Column;
import com.generator.service.column.ColumnService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class ColumnServiceBean implements ColumnService {

    @Autowired
    private ColumnDao columndao;

    @Override
    public void addColumn(Column column) {
        columndao.addColumn(column);
    }

    @Override
    public void delColumn(int columnId) {
        columndao.delColumn(columnId);
    }

    @Override
    public void updateColumn(Column column) {
        columndao.updateColumn(column);
    }

    @Override
    public Column findColumnById(int columnId) {
        return columndao.findColumnById(columnId);
    }

    @Override
    public List<Column> findAllColumns() {
        return columndao.findAllColumns();
    }
}
